cluster=$1
config_path=$2

source ${config_path}/config.sh

${Rscript_magic} ${scripts_dir}/cluster_peak_magic.R \
--cluster ${cluster} \
--input_dir ${output_dir}/cluster_all_result/${cluster} \
--rna_data_file ${input_dir}/testis_combined.Rdata \
--atac_data_file ${output_dir}/cluster_all_result/${cluster}/count/${cluster}_testis_merge_peak_barcode_matrix.Rdata \
--qc_cell_file ${output_dir}/cluster_all_result/cell_fragment/testis_merge_all_qc_barcode_new.txt \
--output_dir ${output_dir}/cluster_all_result/${cluster}/magic \
2> ${log_path}/cluster_peak_magic.${cluster}.log